import Mock from 'mockjs';

const index = Mock.mock(
  '/api/pic-consumer-wx/wx/index','get', (req, res) =>{
    return  {
      "code":200,
      "banners":[
        { "id":"1","url": "http://rp.hengtianche.com/htc_car_wx/images/ls/index_banner1.png"},
        { "id":"2","url": "http://rp.hengtianche.com/htc_car_wx/images/ls/index_banner2.png"},
        { "id":"3","url": "http://rp.hengtianche.com/htc_car_wx/images/ls/index_banner3.png"}
      ],
      "hotProducts":[
        { "id":"1","img": "http://rp.hengtianche.com/htc_car_wx/images/ls/lc1.jpg", "title": "丰田霸道", "detail": "高配 现车","price":"56.9"},
        { "id":"1","img": "http://rp.hengtianche.com/htc_car_wx/images/ls/lc2.jpg", "title": "大众途观", "detail": "高配 现车","price":"36.9"},
        { "id":"1","img": "http://rp.hengtianche.com/htc_car_wx/images/ls/lc15.jpg", "title": "奥迪A6", "detail": "高配 现车","price":"46.9"}
      ],
      "newProducts":[
        { "id":"1","img": "http://rp.hengtianche.com/htc_car_wx/images/ls/lc1.jpg", "title": "丰田霸道", "detail": "高配 现车","price":"56.9"},
        { "id":"1","img": "http://rp.hengtianche.com/htc_car_wx/images/ls/lc2.jpg", "title": "大众途观", "detail": "高配 现车","price":"36.9"},
        { "id":"1","img": "http://rp.hengtianche.com/htc_car_wx/images/ls/lc15.jpg", "title": "奥迪A6", "detail": "高配 现车","price":"46.9"}
      ],
      "buyProducts":[
        { "id":"1","img": "http://rp.hengtianche.com/htc_car_wx/images/ls/lc1.jpg", "title": "丰田霸道", "detail": "高配 现车","price":"56.9"},
        { "id":"1","img": "http://rp.hengtianche.com/htc_car_wx/images/ls/lc2.jpg", "title": "大众途观", "detail": "高配 现车","price":"36.9"},
        { "id":"1","img": "http://rp.hengtianche.com/htc_car_wx/images/ls/lc15.jpg", "title": "奥迪A6", "detail": "高配 现车","price":"46.9"}
      ]
    }
  })


const detail = Mock.mock(
  '/api/pic-consumer-product/product','post', (req, res) =>{
    return  {
      "code":200,
      "title":"2017款 45 TFSI quattro 风尚型",
      "count":"20",
      "des":"欧规2.0T低功率版，一箱油走一千多公里扭矩足！",
      "price":"40.38",
      "productBanners":[
        { "url": "http://rp.hengtianche.com/htc_car_wx/images/ls/index_banner0.png"},
        { "url": "http://rp.hengtianche.com/htc_car_wx/images/ls/index_banner1.png"},
        { "url": "http://rp.hengtianche.com/htc_car_wx/images/ls/index_banner2.png"},
        { "url": "http://rp.hengtianche.com/htc_car_wx/images/ls/index_banner3.png"}
      ],
      "productEvaluates":[
        {"name":"小明","createtime":"2017-09-12","content":"面料挺好 手感不错 没有色差 花纹好看 大小正好，不错 满意","head_img":"http://rp.hengtianche.com/htc_car_wx/images/zfund2.png"},
        {"name":"小明","createtime":"2017-09-12","content":"面料挺好 手感不错 没有色差 花纹好看 大小正好，不错 满意","head_img":"http://rp.hengtianche.com/htc_car_wx/images/zfund2.png"},
        {"name":"小明","createtime":"2017-09-12","content":"面料挺好 手感不错 没有色差 花纹好看 大小正好，不错 满意","head_img":"http://rp.hengtianche.com/htc_car_wx/images/zfund2.png"},
        {"name":"小明","createtime":"2017-09-12","content":"面料挺好 手感不错 没有色差 花纹好看 大小正好，不错 满意","head_img":"http://rp.hengtianche.com/htc_car_wx/images/zfund2.png"},
        {"name":"小明","createtime":"2017-09-12","content":"面料挺好 手感不错 没有色差 花纹好看 大小正好，不错 满意","head_img":"http://rp.hengtianche.com/htc_car_wx/images/zfund2.png"},
        {"name":"小明","createtime":"2017-09-12","content":"面料挺好 手感不错 没有色差 花纹好看 大小正好，不错 满意","head_img":"http://rp.hengtianche.com/htc_car_wx/images/zfund2.png"}
      ],
      "productDetails":[
        {"id":"1","url":"http://rp.hengtianche.com/htc_car_wx/images/detail1.jpg"},
        {"id":"2","url":"http://rp.hengtianche.com/htc_car_wx/images/detail1.jpg"}
      ]
    }
  })

const list = Mock.mock(
  '/api/pic-consumer-product/productCar/list','get', (req, res) =>{
    return  {
      "code":200,
      "productList":[
        {"id":"242434334","img":"http://rp.hengtianche.com/htc_car_wx/images/ls/lc1.jpg","detail":"2017款 45 TFSI quattro 风尚型","companyName":"丰田","count":"10","price":"1112","conf":"conf"},
        {"id":"242434334","img":"http://rp.hengtianche.com/htc_car_wx/images/ls/lc1.jpg","detail":"2017款 45 TFSI quattro 风尚型","companyName":"丰田","count":"10","price":"1112","conf":"conf"},
        {"id":"242434334","img":"http://rp.hengtianche.com/htc_car_wx/images/ls/lc1.jpg","detail":"2017款 45 TFSI quattro 风尚型","companyName":"丰田","count":"10","price":"1112","conf":"conf"},
        {"id":"242434334","img":"http://rp.hengtianche.com/htc_car_wx/images/ls/lc1.jpg","detail":"2017款 45 TFSI quattro 风尚型","companyName":"丰田","count":"10","price":"1112","conf":"conf"}

      ]
    }
  })

const cart = Mock.mock(
  '/api/cart/index','get', (req, res) =>{
    return  {
      "code":200,
      "productList":[
          {
            "name":"北京宝马",
            "list":[
              {
                "img":"http://rp.hengtianche.com/htc_car_wx/images/ls/index_img1.png",
                "title":"2017款 45 TFSI quattro 风尚型 丐版 ",
                "price":"85.9",
                "detail_1":"2017.10.02 零首付大众途观",
                "detail_3":"保险服务 ￥12.00万   X10",
                "detail_2":"高配 白色",
                "detail_4":"X10",
              },
              {
                "img":"http://rp.hengtianche.com/htc_car_wx/images/ls/index_img2.png",
                "title":"2017款 45 TFSI quattro 风尚型 丐版 ",
                "price":"85.9",
                "detail_1":"2017.10.02 零首付大众途观",
                "detail_3":"保险服务 ￥12.00万   X10",
                "detail_2":"高配 白色",
                "detail_4":"X10",
              }
            ]
          },
          {
            "name":"奥迪",
            "list":[
              {
                "img":"http://rp.hengtianche.com/htc_car_wx/images/ls/index_img1.png",
                "title":"2017款 45 TFSI quattro 风尚型 丐版 ",
                "price":"85.9",
                "detail_1":"2017.10.02 零首付大众途观",
                "detail_3":"保险服务 ￥12.00万   X10",
                "detail_2":"高配 白色",
                "detail_4":"X10",
              }
            ]
          }
      ]
    }
  })

export default {index,detail,list,cart}
